Efficient secure data marshaling through at least one untrusted intermediate process

ABSTRACT

Secure marshaling of data via one or more intermediate processes is provided. A source process may create a named shared memory section resulting in a first handle to the shared memory section. The source process may populate the shared memory section with information. An access control list may secure the shared memory section by preventing the one or more intermediate processes from accessing content of the shared memory section, while allowing a target process to access the content. The first handle and a name of the shared memory section may be marshaled to a first intermediate process resulting in a respective new handle to the shared memory section. A last intermediate process may marshal the name to a target process, which may use the name to obtain access to the content of the shared memory section.

BACKGROUND

For a number of reasons, data is marshaled on a computing device from asource process to a target process. At times, the source process maymarshal data to the target process through an intermediate process. Whenthe intermediate process is not trusted, a mechanism for marshaling databetween processes in an efficient and secure manner is desired. Ideally,the mechanism would use resources efficiently and prevent an untrustedintermediate process from accessing marshaled data.

One solution to this problem is the use of cryptography. Cryptographyprovides a mechanism for securely transmitting data along an untrustedchannel. However, security of a cryptographic system depends entirely onkeys. In some operating systems, including, but not limited to Windows®(Windows is a registered trademark of Microsoft Corporation of Redmond,Wash.) operating systems, an operating system provided key managementsystem largely depends on an identity of a process. If trusted processesand untrusted processes execute under one user, then the trustedprocesses and the untrusted processes may have access to the same keys.As a result, in order to effectively use cryptography to secure datafrom the untrusted processes a secure key management system, separatefrom the key management system of the operating system, may be developedand employed.

Other solutions avoid marshaling data through an untrusted channel byeither validating trust of an intermediate process, or by marshalingconnection information, such that a direct channel may be establishedwithout passing data through an untrusted intermediate process.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that is further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

In embodiments consistent with the subject matter of this disclosure,data may be securely and efficiently marshaled from a source process toa target process via one or more intermediate processes, which may beuntrusted processes. In various embodiments, a source process may createa shared memory section having a name and a first handle that referencesthe shared memory section for the source process. The source process maymap the shared memory section to an address space of the source process,such that the source process may populate the shared memory section withinformation. The source process may secure the information in the sharedmemory section by using an access control list.

The source process may marshal the name of the shared memory section tothe one or more intermediate processes and may marshal the first handlereferencing the shared memory section to a first intermediate process ofthe one or more intermediate processes, resulting in a respective newhandle that references the shared memory section for the firstintermediate process. If there is more than one intermediate process,each intermediate process, except a last intermediate process, maymarshal a respective handle to a next intermediate process resulting ina respective new handle for the next intermediate process. The accesscontrol list may prevent the one or more intermediate processes fromusing the respective new handle and the name of the shared memorysection to gain access to the shared memory section.

The last intermediate process may marshal the name of the shared memorysection and the respective new handle to a target process resulting inthe target process having the name of the shared memory section and athird handle that references the shared memory section. The targetprocess may use the name of the shared memory section to create a fourthhandle that references the shared memory section for the target processand may provide the target process with access to the shared memorysection. The target process may then map the shared memory section intoan address space of the target process and may access the informationstored in the shared memory section.

In variations of embodiments consistent with the subject matter of thisdisclosure, the source process, or sender, may store authentication datain the shared memory section and the target process may authenticate thesource process, or the sender, based on the stored authentication datain the shared memory section. In addition, the source process may storea checksum or other information in the shared memory section such thatthe target process may detect whether contents of the shared memorysection have been altered. In some variations, the source process maystore a sequence number into the shared memory section and the targetprocess may detect missing information or information arriving out oforder based on detecting an unexpected gap in the sequence number storedin the shared memory section. In other variations, the source processmay store a timestamp into the shared memory section and the targetprocess may detect a replay attack based on reading an earlier timestampthan a timestamp stored in a previously read shared memory section.Other variations are also possible as will be discussed in the detaileddescription.

DRAWINGS

In order to describe the manner in which the above-recited and otheradvantages and features can be obtained, a more particular descriptionis described below and will be rendered by reference to specificembodiments thereof which are illustrated in the appended drawings.Understand that these drawings depict only typical embodiments and arenot therefore to be considered to be limiting of its scope.Implementations will be described and explained with additionalspecificity and detail through the use of the accompanying drawings.

FIG. 1 is a functional block diagram of an exemplary computing devicewhich may implement embodiments consistent with the subject matter ofthis disclosure.

FIG. 2 is a functional block diagram that illustrates, at a high-level,operation of an embodiment consistent with the subject matter of thisdisclosure.

FIG. 3 includes flowcharts illustrating exemplary processing for asource process, an intermediate process and a target process in anexemplary embodiment consistent with the subject matter of thisdisclosure.

FIGS. 4 and 5 are flowcharts illustrating exemplary processing for asource process and a target process, respectively, in a firstalternative embodiment consistent with the subject matter of thisdisclosure.

FIGS. 6 and 7 are flowcharts illustrating exemplary processing for asource process and a target process, respectively, in a secondalternative embodiment consistent with the subject matter of thisdisclosure.

FIGS. 8 and 9 are flowcharts illustrating exemplary processing for asource process and a target process, respectively, in a thirdalternative embodiment consistent with the subject matter of thisdisclosure.

FIGS. 10 and 11 are flowcharts illustrating exemplary processing for asource process and a target process, respectively, in a fourthalternative embodiment consistent with the subject matter of thisdisclosure.

DETAILED DESCRIPTION Overview

Embodiments consistent with the subject matter of this disclosureefficiently and securely marshal data from a source process to a targetprocess via one or more untrusted intermediate processes. The sourceprocess may call a function to create a named shared memory section andmay return an open handle to the shared memory section.

The shared memory section is a type of kernel object. A kernel object isa resource that is managed by a kernel of an operating system. Thekernel object may be memory, a file, computer hardware, or otherresource and is secured or is a securable object. In embodimentsconsistent with the subject matter of this disclosure, the kernel objectis represented by a handle. Operating systems, including, but notlimited to, Windows® operating systems provide a set of functions formanipulating kernel objects. When a function is called to create akernel object, the function may return a handle that identifies thekernel object.

The shared memory section may be secured by an access control list,which may be provided by a creator of the kernel object when the kernelobject is created. The access control list prevents the one or moreintermediate processes from accessing the shared memory section, butallows the target process to access the shared memory section. Thesource process may use the returned handle to call a function to map theshared memory section into an address space of the source process, suchthat the source process may populate the shared memory section with datato be read by the target process.

After populating the shared memory section with the data, the sourceprocess may marshal reference information to a first intermediateprocess of the one or more intermediate processes. The referenceinformation may include, but not be limited to, the handle and a name ofthe shared memory section. As a result of marshaling the referenceinformation, the first intermediate process of the one or moreintermediate processes has an open respective new handle to the sharedmemory section and the name of the shared memory section. If there aretwo or more intermediate processes, each respective intermediateprocess, except a last intermediate process, may marshal the referenceinformation to a next intermediate process resulting in an openrespective new handle to the shared memory section for the nextintermediate process.

In various embodiments, the shared memory section may be retained aslong as an open handle to the shared memory section exists. Therefore,in such embodiments, after marshaling the handle to the firstintermediate process of the one or more intermediate processes, thesource process may close the handle and the shared memory section may beretained because of existence of the open respective new handle, whichreferences the shared memory section. Similarly, after a respectiveintermediate process marshals the respective new handle to a nextintermediate process, the intermediate process may close its respectivenew handle and the shared memory section may be retained because an openrespective new handle to the shared memory section exists for the nextintermediate process.

The last intermediate process may marshal the name and the respectivenew handle to the target process. After the marshaling of the name andthe respective new handle, the last intermediate process may close itsrespective new handle. As a result of the marshaling, the target processhas an open second handle to the shared memory section and the name ofthe shared memory section. After the respective new handle of the lastintermediate process is closed, the shared memory section may beretained due to existence of the open second handle which references theshared memory section.

The target process may then use the name of the shared memory section toopen a third handle to the shared memory section, close the secondhandle, and call a function to map the shared memory section to anaddress space of the target process. The target process may then access,or read, data stored in the shared memory by the source process.

In various embodiments, when marshaling a handle from a first process toa second process, a desired access to the shared memory section for thesecond process may be specified. For example, when marshaling the firsthandle from the source process to a first intermediate process of theone or more intermediate processes, the specified desired access mayindicate no read access and no write access to the access control listand content of the shared memory section. As a result, the respectivenew handle of the first intermediate process may not permit the firstintermediate process to access the content of the shared memory section.Similarly, when marshaling a respective new handle from one intermediateprocess to a next intermediate process, the specified desired access mayindicate no read access and no write access to the access control listand the content of the shared memory section.

In some embodiments, a different desired access may be specified whenmarshaling a handle from a first process to a second process. Forexample, when marshaling the first handle from the source process to thefirst intermediate process of the one or more intermediate processes,the specified desired access may indicate read access. As a result, theintermediate process may have read access to content of the sharedmemory section provided that the access control list permits the firstintermediate process to have read access to the shared memory section.In such embodiments, when marshaling a respective handle from anintermediate process to a next intermediate process, the specifieddesired access may indicate the read access to allow any otherintermediate processes to have read access to the content of the sharedmemory section provided that the access control list permits suchaccess. In other embodiments, the desired access may be specifieddifferently when marshaling data from the source process through the oneor more intermediate processes or from the last intermediate process tothe target process. In some embodiments, access permissions of a newhandle may be set depending upon characteristics of a process to which ahandle is being marshaled. The characteristics may include, but not belimited to, content of a security descriptor of the process to which thehandle is being marshaled.

Alternate embodiments may also be implemented as will be discussed inmore detail below.

Exemplary Processing Device

FIG. 1 is a block diagram of an exemplary computing device 100, whichmay be used to implement embodiments consistent with the subject matterof this disclosure. Computing device 100 may be a server, a personalcomputer (PC), a laptop computer, a handheld computing device, oranother type of computing device. Computing device 100 may includehardware, such as a processor 160, a bus 110, a memory, which mayinclude a combination of random access memory (RAM) 130 and read onlymemory (ROM) 140, a storage device 170, an input device 120, an outputdevice 150 and a communication interface 180.

Processor 160 may include one or more conventional processors thatinterpret and execute instructions. RAM 130, ROM 140, and/or anothertype of dynamic or static storage medium, respectively, may storeinformation and instructions for execution by processor 160. RAM 130, oranother type of dynamic storage medium, may store instructions as wellas temporary variables or other intermediate information used duringexecution of instructions by processor 160. ROM 140, or another type ofstatic storage medium, may store static information and instructions forprocessor 160. Some embodiments of computing device 100 may furtherinclude a hardware logic component, including, but not limited to, anapplication specific integrated circuit (ASIC) (not shown) and/or afield programmable gate array (FPGA) (not shown) that may be combinedwith instructions in memory 130, 140 to cause computing device 100 toperform a method.

Input device 120 may include a keyboard, a pointing device, or otherdevice for providing input. Output device 150 may include a display, aprinter, or other device for outputting information. Communicationinterface 180 may include a transceiver for sending and receivinginformation via a network (not shown).

Storage device 170 may include a machine-readable storage medium suchas, for example, a magnetic disk, a writable optical disc, a flash RAMdevice, or other type of machine-readable storage media for storingdata, instructions, or other information for more than a transitory timeperiod. Non-limiting examples of storage device 170 may include DigitalVideo Disk (DVD), compact Disk (CD), or other types of storage devicesusing various types of machine-readable storage media for storing dataand/or instructions for later use.

Computing device 100 may communicate with other devices via acommunication medium, which may include, but not be limited to, apropagated signal on a carrier wave and may perform functions inresponse to processor 160 executing sequences of instructions containedin a machine-readable storage medium. Such instructions may be read intoa machine-readable storage medium, including, but not limited to, RAM130, from another machine-readable storage medium or from a separatedevice via communication interface (180).

Embodiments

FIG. 2 is a functional block diagram illustrating, at a high level, anembodiment consistent with the subject matter of this disclosure. Theembodiment includes a source process 202, one or more untrustedintermediate processes 204, a target process 206 and a shared memorysection 208.

As illustrated by 221, source process 202 may create, name and populateshared memory section 208 with data. Shared memory section 208 may besecured by using an access control list which may prevent one or moreuntrusted intermediate processes 204 from accessing the data stored inshared memory section 208. As a result of creating shared memory section208, a handle referencing shared memory section 208 may be returned tosource process 202. As illustrated by 223, source process 202 maymarshal the handle and the name of shared memory section 208 to one ormore untrusted intermediate processes 204.

As a result of the handle being marshaled to a first intermediateprocess of one or more untrusted intermediate process 204, an openrespective new second handle, referencing shared memory section 208, forthe first intermediate process of untrusted intermediate process 204 maybe created and provided to the first intermediate process. Eachintermediate process, except for a last intermediate process, maymarshal a respective new handle and the name of the shared memorysection to a next intermediate process of one or more untrustedintermediate processes 204. Use of the respective new handle and thename of the section by an intermediate process of untrusted intermediateprocess 204 may not provide the intermediate process of untrustedintermediate process 204 with access to shared memory section 208. Thelast intermediate process of untrusted intermediate process 204 maymarshal the respective new handle and the name of shared memory section208 to target process 206, as illustrated by 225.

As a result of the respective new handle being marshaled to targetprocess 206, an open second handle, which references shared memorysection 208, may be created and provided to target process 206. The lastintermediate process may then close its respective new handle. Targetprocess 206 may then use the name of shared memory section 208 to open athird handle, with read access, to contents of shared memory section 208and may access shared memory section 208 to read the data storedtherein, as illustrated by 227. After opening the third handle, targetprocess 206 may close the second handle.

FIG. 3 includes flowcharts that illustrate exemplary operation ofvarious embodiments consistent with the subject matter of thisdisclosure. The process may begin with source process 202 calling afunction, such as, for example, an operating system function, to createshared memory section 208 and to return a first handle, which referencesshared memory section 208 for source process 202 (act 302). In Windows®operating systems, the function may be as follows:

CreateFileMapping (1^(st) parameter, 2^(nd) parameter, 3^(rd) parameter,4^(th) parameter, 5^(th) parameter),

where 1^(st) parameter may be an invalid handle value, 2^(nd) parametermay be a pointer to a security attributes structure that determineswhether a returned handle can be inherited by child processes, 3^(rd)parameter specifies page protection of the shared memory section, 4^(th)parameter is a maximum size in bytes of shared memory section 208; and5^(th) parameter is a name of shared memory section 208.

In some embodiments, the 2nd parameter may have a value of zero (null),thereby indicating that the returned handle cannot be inherited by childprocesses and the 3^(rd) parameter may indicate read-write pageprotection. In other embodiments, different parameters may be used. Inembodiments using an operating system other than any of the Windows®operating systems, a differently-named function (or functions) havingdifferent parameters may be used to create shared memory section 208.

Next, source process 202 may call a function to map shared memorysection 208 into an address space of source process 202 (act 304). InWindows® operating systems the function may be as follows:

MapViewOfFile (1^(st) parameter, 2^(nd) parameter, 3^(rd) parameter,4^(th) parameter),

where 1^(st) parameter may be a handle to shared memory section 208,2^(nd) parameter may be a desired access to shared memory section 208,3^(rd) parameter may be an offset into shared memory section 208 where aview begins, and 4^(th) parameter may be a size of a mapped area ofshared memory section 208.

In various embodiments, the 2^(nd) parameter may indicate the desiredaccess as read/write access and the 3^(rd) parameter may indicate anoffset of 0. In other embodiments, different parameters may be used. Inembodiments using an operating system other than any of the Windows®operating systems, a differently-named function (or functions) havingdifferent parameters may be used to map shared memory section 208 to theaddress space of source process 202.

Source process 202 may then populate shared memory section 208 with data(act 306). Source process 202 may then marshal reference information,including, but not limited to, the first handle and the name of sharedmemory section 208 to a first intermediate process of one or moreintermediate untrusted processes 204 (act 308). In Windows® operatingsystems, marshaling the first handle may be accomplished by calling afunction as follows:

DuplicateHandle (1^(st) parameter, 2^(nd) parameter, 3^(rd) parameter,4^(th) parameter, 5^(th) parameter, 6^(th) parameter, 7^(th) parameter),

where 1^(st) parameter may be a handle for a current process, 2^(nd)parameter may be a handle to be duplicated, 3^(rd) parameter may be ahandle to a process to which the handle to shared memory section 208 isbeing marshaled, 4^(th) parameter may be a pointer to a variable thatreceives a duplicate handle of the marshaled handle, 5^(th) parametermay specify a desired access for the duplicate handle, 6^(th) parametermay indicate whether the duplicate handle can be inherited by childprocesses of the target process, and 7^(th) parameter may affect whethera source handle is closed or whether the duplicate handle has a sameaccess as a source handle. In various embodiments, the 5th parameter mayspecify read access, the 6th parameter may specify that the duplicatehandle is not inheritable, and the 7^(th) parameter may be set to zero.In other embodiments different parameter values may be employed. Inembodiments using an operating system other than any of the Windows®operating systems, a differently-named function (or functions) havingdifferent parameters may be used to marshal a handle to another process.

The name of shared memory section 280 may be marshaled using any methodof inter-process communication including, but not limited to, well-knownmethods of inter-process communication.

After source process 202 marshals the first handle to the firstintermediate process of one or more untrusted intermediate processes204, resulting in the first intermediate process of one or moreuntrusted intermediate processes 204 receiving a respective new handlewhich references shared memory section 208. Source process 202 may thenclose the first handle (act 310). Because at least one handlereferencing shared memory section 208 exists (i.e., the respective newhandle), shared memory section 208 may be retained. Otherwise, sharedmemory section 208 may be released.

The first intermediate process of one or more untrusted intermediateprocesses 204 may receive the marshaled handle, as the respective newhandle, and the marshaled section name (act 322). Untrusted intermediateprocess 204 may not be able to use the respective new handle and thesection name to access shared memory section 208, but may marshalreference information, including, but not limited to, the respective newhandle and the section name, to a next intermediate process of one ormore untrusted intermediate processes 204, if any (not shown). If thecurrent intermediate process is a last intermediate process of one ormore untrusted intermediate processes, the last intermediate process maymarshal reference information, including the respective new handle forthe current intermediate process and the section name to target process206 (act 324). The last intermediate process of one or more untrustedintermediate processes 204 may marshal the reference information totarget process 206.

After the last intermediate process of one or more untrustedintermediate processes 204 marshals the respective new handle to targetprocess 206, resulting in target process 206 receiving a second handlereferencing shared memory section 208, the last intermediate process mayclose the respective new handle (act 326). Because at least one handlereferencing shared memory section 208 exists (i.e., the second handle),shared memory section 208 may be retained. Otherwise, shared memorysection 208 may be released.

Target process 206 may receive the marshaled handle, as the secondhandle, and the marshaled section name (act 332). Target process 206 maythen use the name of shared memory section 208 to open a third handlewith read access to shared memory section 208 and may close the secondhandle (act 334). In some embodiments, target process 206 may performact 334 by calling CreateFileMapping to create and return the open thirdhandle referencing shared memory section 208.

Target process 306 may then map shared memory section 208 into anaddress space of target process 206 (act 336). Target process 206 mayperform act 336 in a similar manner as act 304 was performed. Targetprocess 206 may then access and read shared memory section 208 (act338).

After reading shared memory section 208, target process 206 may closethe third handle (act 340). At this point, if no other handle thatreferences shared memory section 208 exists, then the operating systemmay release shared memory section 208.

Alternative Embodiments

A number of alternative embodiments may be implemented. For example,when shared memory section 208 is created by source process 202, adifferent security descriptor (within the security attributes structure)may be specified for shared memory section 208. For example, thesecurity descriptor may allow read access, but deny write access tocontent of shared memory section 208.

In a second alternative embodiment, source process 202 may storeauthentication data in shared memory section 208 and target process 206may authenticate source process 202 based on the stored authenticationdata. FIG. 4 is a flowchart illustrating an exemplary process performedby source process 202 during act 306 (FIG. 3) in the second alternativeembodiment. The process may begin with source process 202 performing anyactions for preparing data for writing (act 402). Act 402 may includedata generation or formatting in some embodiments. Source process 202may then calculate or generate authentication data (act 404). In someembodiments, the authentication data may include a message digestcalculated over contents of the data to be written to shared memorysection 208. In other embodiments, other authentication methods may beemployed to generate authentication data. Source process 202 may thenwrite the data and the authentication data to shared memory section 208.

FIG. 5 is a flowchart illustrating an exemplary process performed bytarget process 206 during act 338 (FIG. 3) in the second alternativeembodiment. The process may begin with target process 206 readingcontents of shared memory section 208 (act 502). Target process 204 maythen authenticate a sender (source process 202) of the data read fromshared memory section 208 using the authentication data written toshared memory section 208 (act 504). Target process 204 may thendetermine whether authentication was successful (act 506). Ifauthentication was successful, then the process is complete. Otherwise,target process 204 may perform an action, such as, for example,discarding the data read from shared memory section 208 and/orperforming one or more other actions (act 508).

In a third alternative embodiment, source process 202 may store asequence number in shared memory section 208 and target process 206 maydetermine whether data from source process 202 is missing based on anunexpected gap in sequence numbers. FIG. 6 is a flowchart illustratingan exemplary process performed by source process 202 during act 306(FIG. 3) in the third alternative embodiment. The process may begin withsource process 202 performing any actions for preparing data for writing(act 602). Act 602 may include data generation or formatting in someembodiments. Source process 202 may then include a current sequencenumber with data to be written to shared memory section 208 (act 604).Source process 202 may then write the data and the current sequencenumber to shared memory section 208 (act 606) and may increment thecurrent sequence number (act 608).

FIG. 7 is a flowchart illustrating an exemplary process performed bytarget process 206 during act 338 (FIG. 3) in the third alternativeembodiment. The process may begin with target process 206 readingcontents of shared memory section 208 (act 702). Target process 204 maythen determine whether the sequence number read from shared memorysection 208 is equal to an expected sequence number (act 704). If theread sequence number is equal to the expected sequence number, thentarget process 204 may increment the expected sequence number (act 706).Otherwise, target process 204 may perform an action, such as, forexample, discarding the data read from shared memory section 208 and/orone or more other actions (act 708).

In a fourth alternative embodiment, source process 202 may store atimestamp into shared memory section 208 and target process 206 maydetect an attack including, but not limited to a replay attack, based onthe stored timestamp. FIG. 8 is a flowchart illustrating an exemplaryprocess performed by source process 202 during act 306 (FIG. 3) in thefourth alternative embodiment. The process may begin with source process202 performing any actions for preparing data for writing (act 802). Act802 may include data generation or formatting in some embodiments.Source process 202 may include a current timestamp with the data to bewritten to shared memory section 208 (act 804). Source process 202 maythen write the data and the timestamp to shared memory section 208 (act806).

FIG. 9 is a flowchart illustrating an exemplary process performed bytarget process 206 during act 338 (FIG. 3) in the fourth alternativeembodiment. The process may begin with target process 206 readingcontents of shared memory section 208 (act 902). Target process 204 maythen determine whether the timestamp read from shared memory section 208indicates a later time than a last read timestamp from a last readcontents of shared memory section 208 originated from source process 202(act 904). If the timestamp read from shared memory section 208indicates a later time than the last read timestamp, then the timestampmay be saved in order to be used for comparison with a timestampincluded in another shared memory section 208 from source process 202(act 906). Otherwise, target process 206 may perform an action, such as,for example, discarding the data read from shared memory section 208and/or performing one or more other actions (act 908).

In a fifth alternative embodiment, source process 202 may store sizeinformation in shared memory section 208 to allow run-time sizing ofshared memory section 208. FIG. 10 is a flowchart illustrating anexemplary process performed by source process 202 during act 306 (FIG.3) in the fifth alternative embodiment. The process may begin withsource process 202 performing any actions for preparing data for writing(act 1002). Act 1002 may include data generation or formatting in someembodiments. Source process 202 may include size data, indicating a sizeof shared memory section 208, with the data to be written (act 1004).Source process 202 may then write the data and the size data to sharedmemory section 208 (act 1006).

FIG. 11 is a flowchart illustrating an exemplary process performed bytarget process 206 during act 334 (FIG. 3) in the fifth alternativeembodiment. The process may begin with target process 206 opening afirst new handle to a fixed portion of shared memory section 208 basedon the marshaled name of shared memory section 208 (act 1102). Targetprocess 206 may then map the fixed portion of shared memory section 208into the address space of target process 206 (act 1104). Target process206 may then access and read the size data from shared memory section208 (act 1106). Target process 206 may then open a second new handle toshared memory section 208, and may indicate a size of shared memorysection 208 based on the read size data (act 1108). Target process 206may then close the first new handle to shared memory section 208 (act1110). The sized shared memory section 208 may then be mapped into theaddress space of target process 206 (act 1112). Target process 206 maythen read complete contents of shared memory section 208 (act 1114).Acts 336-340 (FIG. 3) may then be performed. However, act 340 may bemodified to close the second new handle because the first new handle wasalready closed during act 1110.

Miscellaneous

Although the above mentioned alternative embodiments are described asseparate embodiments, various other alternative embodiments may includeany or all of the features of the multiple previously describedembodiments. For example, in one alternative embodiment source process202 may write authentication data and size information to shared memorysection 208 and target process 206 may read the size information inshared memory section 208, may open a handle to shared memory section208 sized according to the size information and may performauthentication based on the authentication data.

CONCLUSION

Embodiments consistent with the subject matter of this disclosureefficiently and securely marshal data from a source process to a targetprocess through one or more untrusted intermediate processes. Theembodiments may efficiently marshal encrypted or unencrypted datawithout adversely affecting security of the data with respect to the oneor more untrusted intermediate processes.

Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter in the appended claims is not necessarilylimited to the specific features or acts described above. Rather, thespecific features and acts described above are disclosed as exampleforms for implementing the claims.

Accordingly, the appended claims and their legal equivalents defineembodiments, rather than any specific examples given.

1. A machine-implemented method for securely marshaling data betweenprocesses executing in at least one computing device, themachine-implemented method comprising: creating a shared memory sectionby a source process executing in a computing device; populating theshared memory section by the source process; marshaling referenceinformation regarding the populated shared memory section from thesource process to a first intermediate process of at least oneintermediate process executing in the computing device, the referenceinformation not permitting access to the populated shared memory sectionby the at least one intermediate process; repeating the marshaling, onlywhen the at least one intermediate process includes at least twointermediate processes, respective reference information from arespective intermediate process to a next respective intermediateprocess until the next intermediate process is a last intermediateprocess; marshaling the reference information regarding the populatedshared memory section from a last one of the at least one intermediateprocess to a target process executing in the computing device; opening,by the target process, a new handle to the shared memory section byusing at least some of the marshaled reference information; and reading,by the target process, the populated shared memory section.
 2. Themachine-implemented method of claim 1, wherein the populating the sharedmemory section by the source process further comprises: populating theshared memory section with unencrypted information.
 3. Themachine-implemented method of claim 1, the reference informationincludes a handle to the shared memory section and a name of the sharedmemory section.
 4. The machine-implemented method of claim 1, furthercomprising: securing the populated shared memory section using an accesscontrol list which does not provide access to contents of the sharedmemory section by the at least one intermediate process and does provideaccess to contents of the shared memory section by the target process.5. The machine-implemented method of claim 1, further comprising:storing, by the source process, authentication data in the shared memorysection; and authenticating, by the target process, the source processbased on the authentication data stored in the shared memory section bythe source process.
 6. The machine-implemented method of claim 1,further comprising: storing, by the source process, sequence data in theshared memory section; checking, by the target process, the sequencedata included in the shared memory section to detect an unexpected gapin sequence numbers.
 7. The machine-implemented method of claim 1,further comprising: storing timestamp data in the shared memory sectionby the source process.
 8. The machine-implemented method of claim 1,further comprising: storing size information in the shared memorysection by the source process; opening, by the target process, a fixedsize portion of the shared memory section; accessing, by the targetprocess, the size information stored in the fixed size portion of theshared memory section; and reopening, by the target process, the sharedmemory section with a correct size as indicated by the size information.9. A computing device comprising: at least one processor; and a memoryconnected to the at least one processor, the memory having instructionsrecorded therein, such that when the at least one processor executes theinstructions, a method is performed comprising: creating a shared memorysection and opening a first handle for a source process, the firsthandle referencing the shared memory section, populating, by the sourceprocess, the shared memory section, creating and opening, by the sourceprocess, a new handle that references the shared memory section for acurrent intermediate process of at least one intermediate process, thesecond handle being based on the first handle to the shared memoryprocess and having a desired access attribute that permits limited or noaccess to content of the shared memory section by the at least oneintermediate process, closing the first handle by the source process;marshaling, by the source process, a name of the shared memory sectionto the intermediate process, repeating while the current intermediateprocess is not a last intermediate process of the at least oneintermediate process: creating and opening, by the current intermediateprocess, a respective new handle that references the shared memorysection for a next current intermediate process of the at least oneintermediate process, marshaling, by the current intermediate process,the name of the shared memory section to the next current intermediateprocess of the at least one intermediate process, closing the respectivenew handle by the current intermediate process, preparing to performprocessing for the next current intermediate process as the currentintermediate process, creating and opening, by the last intermediateprocess of the at least one intermediate process, a second handle thatreferences the shared memory section for a target process, closing therespective new handle by the last intermediate process, marshaling, bythe last intermediate process, the name of the shared memory section tothe target process, opening, by the target process, a third handle tothe shared memory section by using the marshaled name of the sharedmemory section, closing the second handle by the target process, andreading, by the target process, the shared memory section.
 10. Thecomputing device of claim 9, wherein the method further comprises:guaranteeing existence of the shared memory section as long as at leastone handle that references the shared memory section is open.
 11. Thecomputing device of claim 9, wherein the method further comprises:securing the shared memory section by using an access control list. 12.The computing device of claim 9, wherein the method further comprises:storing, by the source process, authentication data in the shared memorysection; authenticating, by the target process, the source process basedon the authentication data.
 13. The computing device of claim 12,wherein the method further comprises: discarding data populating theshared memory section when the target process fails to successfullyauthenticate the source process.
 14. The computing device of claim 9,wherein the method further comprises: storing timestamp data in theshared memory section by the source process; and detecting, by thetarget process, a replay attack based on the timestamp data stored inthe shared memory section.
 15. The computing device of claim 9, whereinthe method further comprises: storing sequence information in the sharedmemory section by the source process; and detecting, by the targetprocess, an unexpected gap in numbering of the sequence informationbased on the stored sequence information.
 16. A machine-readable storagemedium having instructions recorded therein, such that when theinstructions are executed by at least one processor of a computingdevice, the computing device performs a method comprising: creating, bya source process executing on the computing device, a shared memorysection and opening a first handle that references the shared memorysection for the source process, populating, by the source process, theshared memory section, the populating including storing of sizeinformation in the shared memory section, the size informationindicating a size of the shared memory section used, creating andopening, by the source process, a respective new handle that referencesthe shared memory section for a current intermediate process of at leastone intermediate process, the respective new handle having a desiredaccess attribute that permits limited or no access to content of theshared memory section by the at least one intermediate process, closingthe first handle by the source process; marshaling, by the sourceprocess, a name of the shared memory section to the current intermediateprocess, repeating while the current process is not a last intermediateprocess of the at least one intermediate process: creating and opening,by the current intermediate process, a respective new handle thatreferences the shared memory section for a next current intermediateprocess of the at least one intermediate process, marshaling, by thecurrent intermediate process, the name of the shared memory section tothe next current intermediate process of the at least one intermediateprocess, closing the respective new handle by the current intermediateprocess, preparing to perform processing for the next currentintermediate process as the current intermediate process, creating andopening, by the last intermediate process, a second handle thatreferences the shared memory section for a target process, closing therespective new handle by the last intermediate process, marshaling, bythe last intermediate process, the name of the shared memory section tothe target process, opening, by the target process, a third handle tothe shared memory section by using the name of the shared memorysection, closing the second handle by the target process, and reading,by the target process, the shared memory section.
 17. Themachine-readable storage medium of claim 16, wherein the opening a thirdhandle to the shared memory section by using the name of the sharedmemory section further comprises: opening, by the target process, afixed size portion of the shared memory section; accessing, by thetarget process, the size information stored in the fixed size portion ofthe shared memory section; and reopening, by the target process, theshared memory section with a correct size as indicated by the sizeinformation.
 18. The machine-readable storage medium of claim 16,wherein the method further comprises: securing the shared memory sectionby using an access control list which does not provide access to thecontent the shared memory section by the intermediate process and doesprovide access to the content of the shared memory section to the targetprocess.
 19. The machine-readable storage medium of claim 18, whereinthe method further comprises: storing, by the source process,authentication data in the shared memory section; and authenticating, bythe target process, the source process based on the authentication datastored in the shared memory section by the source process.
 20. Themachine-readable storage medium of claim 16, wherein the method furthercomprises: storing, by the source process into the shared memorysection, sequence data, timestamp data, or both of the sequence data andthe timestamp data.